/*
 * @lc app=leetcode.cn id=168 lang=typescript
 *
 * [168] Excel表列名称
 */

// @lc code=start

// 进制转换

function convertToTitle(columnNumber: number): string {
    let temp = columnNumber;
    let result = "";
    while (temp > 0) {
        let t = (temp - 1) % 26;
        result = String.fromCharCode(t + 65) + result;

        temp = Math.floor((temp - 1) / 26);
    }
    return result;
}
// @lc code=end
